home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / fish / 001-100 / 001-025 / 014 / dex / hashtbl.h < prev    next >
C/C++ Source or Header  |  1995-03-17  |  2KB  |  77 lines

  1. /************************************************************************
  2.  *                                    *
  3.  *            Copyright (c) 1982, Fred Fish            *
  4.  *                All Rights Reserved                *
  5.  *                                    *
  6.  *    This software and/or documentation is released for public    *
  7.  *    distribution for personal, non-commercial use only.        *
  8.  *    Limited rights to use, modify, and redistribute are hereby    *
  9.  *    granted for non-commercial purposes, provided that all        *
  10.  *    copyright notices remain intact and all changes are clearly    *
  11.  *    documented.  The author makes no warranty of any kind with    *
  12.  *    respect to this product and explicitly disclaims any implied    *
  13.  *    warranties of merchantability or fitness for any particular    *
  14.  *    purpose.                            *
  15.  *                                    *
  16.  ************************************************************************
  17.  */
  18.  
  19.  
  20. /*
  21.  *  FILE
  22.  *
  23.  *    hashtbl.h   header file for generic hash table usage
  24.  *
  25.  *  KEY WORDS
  26.  *
  27.  *    header files
  28.  *    generic hash table
  29.  *
  30.  *  SYNOPSIS
  31.  *
  32.  *    #include "hashtbl.h"
  33.  *
  34.  *  DESCRIPTION
  35.  *
  36.  *    Contains structure declarations and other common stuff
  37.  *    for program modules which use the generic hash table
  38.  *    routines.
  39.  *
  40.  *    Note that this is where the table data structure is
  41.  *    defined, hence this is generally the only place where
  42.  *    changes need be made for different applications.
  43.  *
  44.  *    The only sacrosanct items in the table data structure
  45.  *    are the structure tag and the name field.  All other
  46.  *    fields can be changed by the user.
  47.  *
  48.  *  AUTHOR
  49.  *
  50.  *    Fred Fish
  51.  *
  52.  */
  53.  
  54. /*
  55.  *    Configuration options.  Things which are generally somewhat
  56.  *    arbitrary (based on time or size constraints) belong here.
  57.  *
  58.  */
  59.  
  60. #define HASH_SIZE 100        /* Size of the configuration table */
  61.  
  62. /*
  63.  *    Definition of the table data structure.  Note that this
  64.  *    structure must be customized for each usage.  The only
  65.  *    sacrosanct items are the struct tag ("tbl_data") and the
  66.  *    name field ("name").  These are the only portions of the
  67.  *    structure used internally in the table manipulation
  68.  *    routines.
  69.  */
  70.  
  71. struct tbl_data {        /* Contains the actual table data */
  72.     char *name;            /* Name of the entry (required) */
  73.     char *out;            /* Name of output stream */
  74.     FILE *ofp;            /* Pointer to output stream (if open) */
  75.     int flags;            /* Section flags */
  76. };
  77.